/*
    Copyright Nicolas Ronvel 2007
	gulix33xp@yahoo.fr

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

using System;

using SdlDotNet.Input;

namespace BlindShark.GameElements
{
	public enum PlayerState
	{
		inGame,
		answering,
		outGame
	}
	
	/// <summary>
	/// A Blind Shark player
	/// </summary>
	public class Player
	{
		#region Variables
		private Profile _profile;
		private PlayerState _state;
		private int _iScore;
		private Key _kBuzzerKey;
		#endregion
		
		#region Constructors
		public Player(Profile p)
		{
			_profile = p;
			_state = PlayerState.inGame;
			_iScore = 0;
		}
		#endregion		
		
		#region Properties
		/// <summary>
		/// Player Name
		/// </summary>
		public string Name
		{
			get { return _profile.Name;}
		}
		
		/// <summary>
		/// Player Description
		/// </summary>
		public string Description
		{
			get { return _profile.Description;}
		}
		
		/// <summary>
		/// Path to the Player Avatar
		/// </summary>
		public string Avatar
		{
			get { return _profile.PictureFile;}
		}
		
		/// <summary>
		/// Player state during the game
		/// </summary>
		public PlayerState State
		{
			get {return _state;}
			set {_state = value;}
		}
		
		/// <summary>
		/// GameScore of the player
		/// </summary>
		public int Score
		{
			get {return _iScore;}
			set {_iScore = value;}
		}
		
		/// <summary>
		/// Key the player must press to answer
		/// </summary>
		public Key BuzzerKey
		{
			get {return _kBuzzerKey;}
			set {_kBuzzerKey = value;}
		}
		#endregion
	}
}
